package com.simu.own.utils;

import java.io.File;

import org.apache.log4j.Level;
import org.apache.log4j.Logger;

import android.os.Environment;
import de.mindpipe.android.logging.log4j.LogConfigurator;

public class L {
	public static  LogConfigurator logConfigurator=null;
	public static Logger gLogger=null;
	 static{
		logConfigurator = new LogConfigurator();        
        logConfigurator.setFileName(Environment.getExternalStorageDirectory() + File.separator + "crifanli_log4j.doc");
        logConfigurator.setMaxFileSize(1024 * 1024 * 5);
        // Set the root log level
        logConfigurator.setRootLevel(Level.DEBUG);
        // Set log level of a specific logger
        logConfigurator.setLevel("org.apache", Level.ERROR);
        logConfigurator.configure();
        gLogger = Logger.getLogger("log");
	}
	public	static void d(String msg){
		gLogger.debug(msg);
	}
	public static void i(String msg){
		gLogger.info(msg);
	}
	public static void e(String msg){
		gLogger.error(msg);
	}
	public static void w(String msg){
		gLogger.warn(msg);		
	}
}
